from django.db import models


# Create your models here.
class Cookies(models.Model):
    cookie = models.TextField()  # cookie
    status = models.CharField(max_length=4)  # cookie状态
    last_update = models.DateTimeField()  # cookie存储时间


class UserMess(models.Model):
    nick_name = models.CharField(max_length=32)  # 昵称
    profile = models.CharField(max_length=128)  # 个人中心网址
    years = models.CharField(max_length=4)  # 码龄
    picture = models.CharField(max_length=128)  # 头像
    tags = models.CharField(max_length=256)  # 徽章
    u_c = models.OneToOneField(to=Cookies, on_delete=models.CASCADE)  # cookie表关系


class Tasks(models.Model):
    sender = models.CharField(max_length=16)  # 发布者
    title = models.CharField(max_length=128)  # 文章标题
    article_url = models.CharField(max_length=128)  # 文章url
    release_time = models.DateTimeField()  # 任务发布时间
    finished_time = models.DateTimeField()  # 任务预计完成时间
    status = models.CharField(max_length=4)  # 状态
